package cn.edu.njpi.five;

public class Main {
    public static void main(String[] args) {
        Bank bank = new Bank(50, "朱宗辉");
        MyThread myThread = new MyThread();
        MyThread myThread1 = new MyThread();
        MyThread myThread2 = new MyThread();
        MyThread myThread3 = new MyThread();
        try {
            myThread.deposit(bank, 40);
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            myThread1.deposit(bank, 20);
        } catch (Exception e) {
            //                Thread.sleep(5000);
        }
        try {
            myThread2.deposit(bank, 20);
        } catch (Exception e) {
            //                Thread.sleep(5000);
        }
        try {
            myThread3.deposit(bank, 20);
        } catch (Exception e) {
            //                Thread.sleep(5000);
        }
    }
}
